#include<iostream>
using namespace std;
int main(){
    unsigned long long s;
    int n=0;
    cin>>s;
    while(s){
        if(s%2==0)n++;
        s/=2;
    }
    cout<<n<<endl;
    return 0;
}